/**
 * @Author admin
 * @Date 2019/3/22 9:13
 */

public class Test {
    public static void main(String[] args) {
        Student[] students = new Student[4];
        students[0] = new Collegestudent("张三");
        students[1] = new Collegestudent("李四");
        students[2] = new Undergraduate("jack");
        students[3] = new Undergraduate("lily");
        float[] score={87,90,78};
        for (int i=0;i<students.length;i++){

            students[i].calculateGrade();
        }
        System.out.println("姓名\t类型\t等级");
        for (int i=0;i<students.length;i++){
            System.out.println(students[i].getName()+"\t"+
                    students[i].getType()+"\t"+
                    students[i].getCourseGrade()
            );
        }
    }
}

